package com.xiaohai.service.impl;

import com.xiaohai.projo.Admin;
import com.xiaohai.mapper.AdminMapper;
import com.xiaohai.service.AdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaohai
 * @since 2024-04-01
 */
@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements AdminService {

    @Autowired
    private AdminMapper adminMapper;
    @Override
    public boolean updatePasswordByAccount(String account, String newPassword) {
        int update = adminMapper.updatePasswordByAccount(account, newPassword);
        return update > 0;
    }
}
